﻿using LuckyShell.ShellValues;

namespace LuckyShell.ShellOrders;

public class FuncOrder(string name, List<IdentifierValue> arg, BlockOrder blockOrder, ShellValue? _return)
    : ShellOrder
{
    public void Run(ref VariateManager manager)
    {
        manager.SetValue(Name, this);
    }

    public List<IdentifierValue> Arg { get; set; } = arg;
    public BlockOrder BlockOrder { get; set; } = blockOrder;
    public ShellValue? Return { get; set; } = _return;
    private string Name { get; set; } = name;
}